package demo03;

public class Test {
    public static void main(String[] args) {
        Vehicle[] vehicles=new Vehicle[4];
        vehicles[0] = new Car("宝马","x5");
        vehicles[1] = new Car("凯迪拉克","xt5");
        vehicles[2] = new Car("路虎","揽胜");
        vehicles[3] = new Car("奔驰","C级");
        for (Vehicle vehicle : vehicles){
            vehicle.drive();
        }
    }


}
